// 使用gst-pipeline的方式播放gst的管道。
#pragma once

#include <QMediaPlayer>
#include <QVideoWidget>

class CameraPlayer : public QObject {
    Q_OBJECT
public:
    CameraPlayer(QWidget* parent);
    bool isOpened();
    void open(QString dev);
    void close();
    QString getDevPath() { return m_dev; }
    void mirred();

private:
    QMediaPlayer* m_player;
    QVideoWidget* m_vw;
    QString m_dev;
    bool m_mirr = false;
};
